﻿using FPSO.Models.ViewModel.Controls;
using FPSO.Services.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPSO.Services.Impl
{
    public class RealShipInfoServiceImpl : IShipInfoService
    {
        private TSMapperBrige valueBrige;

        public RealShipInfoServiceImpl(string pdbConnStr, UCShipInfoViewModel viewModel)
        {
            SnapTSService tsService = new SnapTSService();
            tsService.ConnStr = pdbConnStr;
            valueBrige = new TSMapperBrige(tsService);
            valueBrige.InitDataContext(viewModel);
        }

        public void ReflushData(DateTime currentTime)
        {
            valueBrige.UpdateValues();
        }
    }
}
